package com.lzl.edu.config;

import com.alibaba.druid.pool.DruidDataSource;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * <h3>lzl_ws</h3>
 * <p>JDBC配置项</p>
 *
 * @author : 黎钟龙
 * QQ:1661548820
 * Mail：1661548820@qq.com
 * @date : 2022-03-23 20:39
 **/
//使用hikari数据库
//@Configuration
public class JDBCConfig {
    @Bean
//    添加前缀
    @ConfigurationProperties("jdbc")
    public DataSource dataSource(){
        return new DruidDataSource();
    }
}
